package com.axis2.common.message;

/**
 * ResMessage
 * 
 * @author: Fred
 * @version: 13-5-24下午1:53
 */
public abstract class ResMessage extends Message {

	/**
	 * 响应code 01：成功；02：失败；03：处理中；04：需要冲正；05：需要签到；06：异常;07:验证失败  08:需要签退
	 */
	protected String repCode;

	/**
	 * 响应消息
	 */
	protected String repMsg;

	/**
	 * 银行响应code
	 */
	protected String bankRepCode;

	/**
	 * 银行响应消息
	 */
	protected String bankMsg;

	/**
	 * 通道号
	 */
	protected String channelCode;

	/**
	 * 币种
	 */
	private String ccyCode;
	
	
	/**
	 * 商户号
	 */
	private String ipsmercode;

	/**
	 * 供应商流水号
	 */
	protected String supplierBillNo;

	public boolean isSuccess() {
		return "01".equals(getRepCode());
	}

	public boolean isFail() {
		return "02".equals(getRepCode());
	}

	public boolean isNeedSign() {
		return "05".equals(getRepCode());
	}

	public boolean isNeedReversal() {
		return "04".equals(getRepCode());
	}

	public boolean isDealing() {
		return "03".equals(getRepCode());
	}

	public boolean isException() {
		return "06".equals(getRepCode());
	}
	
	public boolean isVertify(){
		return "07".equals(getRepCode());
	}
	
	public boolean isSignOut(){
		return "08".equals(getRepCode());
	}


	public void setSuccess() {
		setRepCode("01");
	}

	public void setFail() {
		setRepCode("02");
	}

	public void setNeedSign() {
		setRepCode("05");
	}

	public void setNeedReversal() {
		setRepCode("04");
	}

	public void setDealing() {
		setRepCode("03");
	}

	public void setException() {
		setRepCode("06");
	}

	public void setVertify(){
		setRepCode("07");
	}
	public void setSignOut(){
		setRepCode("08");
	}
	public String getRepCode() {
		return repCode;
	}

	public void setRepCode(String repCode) {
		this.repCode = repCode;
	}

	public String getRepMsg() {
		return repMsg;
	}

	public void setRepMsg(String repMsg) {
		this.repMsg = repMsg;
	}

	public String getBankRepCode() {
		return bankRepCode;
	}

	public void setBankRepCode(String bankRepCode) {
		this.bankRepCode = bankRepCode;
	}

	public String getBankMsg() {
		return bankMsg;
	}

	public void setBankMsg(String bankMsg) {
		this.bankMsg = bankMsg;
	}

	public String getChannelCode() {
		return channelCode;
	}

	public void setChannelCode(String channelCode) {
		this.channelCode = channelCode;
	}

	public String getCcyCode() {
		return ccyCode;
	}

	public void setCcyCode(String ccyCode) {
		this.ccyCode = ccyCode;
	}

	public String getSupplierBillNo() {
		return supplierBillNo;
	}

	public void setSupplierBillNo(String supplierBillNo) {
		this.supplierBillNo = supplierBillNo;
	}

	public String getIpsmercode() {
		return ipsmercode;
	}

	public void setIpsmercode(String ipsmercode) {
		this.ipsmercode = ipsmercode;
	}

	
}
